from django.db import models

# Create your models here.
from utils.BaseModel import BaseModel


class NavModel(BaseModel):
    navname = models.CharField(max_length=20, verbose_name='导航名称')
    position = models.IntegerField(default=0, verbose_name='导航位置')

    def __str__(self):
        return self.navname

    class Meta:
        db_table = 'fgnav'


class BannerModel(BaseModel):
    title = models.CharField(max_length=20, verbose_name='轮播图标题')
    img = models.CharField(max_length=1024, verbose_name='轮播图图片')
    url = models.CharField(max_length=1024, verbose_name='轮播图链接')

    def __str__(self):
        return self.title

    class Meta:
        db_table = 'fgbanner'


